#!/usr/bin/env python
# -*- coding: utf-8 -*-
# --------------------------------------------------
#Author:		LJ
#Email:			admin@attacker.club
#Site:		    blog.attacker.club

#Site:blog.attacker.club  Mail:admin@attacker.club
#Date:2017-09-15 01:00:34 Last:2017-09-15 01:00:34
#Description:
# --------------------------------------------------

f = open ('f.txt','w')
f.write('hehe1\n')
f.flush()
f.write('hehe2\n')
print('缓存数据',f.buffer)



f.flush()
#print('缓存数据',f.buffer,[i for i in f.buffer])
f.close()
# 默认py写的数据会在内存中保留，默认长度满了或者f.close()才会写入




"""
 刷新内存buffer到硬盘上，可用于实时刷新
"""